#include <iostream>
using namespace std;
class Adaptee{//目标类
public:
    void AdapteePro(){
        cout<<"Adaptee class"<<endl;
    }
};
class Adapter{//适配器
private:
    Adaptee adaptee;
public:
    void AdapterPro(){
        adaptee.AdapteePro();
    }
};
class PAdapter{
private:
    Adaptee * adaptee;
public:
    PAdapter(){
        adaptee = new Adaptee();
    }
    void AdapterPro(){
        adaptee->AdapteePro();
    }

};
int main(){
//    Adapter adapter;
//    adapter.AdapterPro();


    PAdapter * pAdapter = new PAdapter();
    pAdapter->AdapterPro();
    delete(pAdapter);
    return 0;
}